package com.seeyon.apps.commonExt.domain;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;

/**
 * @description:
 * @author: huangjin
 * @time: 2025/4/3 14:58
 */
public class StartProcessExt implements Serializable {

    public StartProcessExt() {
        this.appName = "collaboration";
        this.data = new ProcessTemplate();
    }

    public StartProcessExt(String appName, ProcessTemplate data) {
        this.appName = appName;
        this.data = data;
    }

    // 应用类型
    private String appName;

    // data参数
    private ProcessTemplate data;


    public String getAppName() {
        return appName;
    }

    public void setAppName(String appName) {
        this.appName = appName;
    }

    public ProcessTemplate getData() {
        return data;
    }

    public void setData(ProcessTemplate data) {
        this.data = data;
    }

    public static class ProcessTemplate {

        public ProcessTemplate() {
            this.draft = "0";
            this.data = new HashMap<String, Object>();
        }

        // 模板编号，参见表单正文流程模板编号
        private String templateCode;

        // 是否为待发：0:新建-发送；1:新建-保存待发
        private String draft;

        // 协同标题区附件，Long型List，值为附件的Id。Id是附件接口响应结果中fileUrl字段的值。
        private Set<Long> attachments;

        // 协同公文的id
        private String relateDoc;

        // 未设置取模板设置的标题
        private String subject;

        // 表单data参数
        private Map<String, Object> data;

        public String getTemplateCode() {
            return templateCode;
        }

        public void setTemplateCode(String templateCode) {
            this.templateCode = templateCode;
        }

        public String getDraft() {
            return draft;
        }

        public void setDraft(String draft) {
            this.draft = draft;
        }

        public Map<String, Object> getData() {
            return data;
        }

        public void setData(Map<String, Object> data) {
            this.data = data;
        }

        public Set<Long> getAttachments() {
            return attachments;
        }

        public void setAttachments(Set<Long> attachments) {
            this.attachments = attachments;
        }

        public String getRelateDoc() {
            return relateDoc;
        }

        public void setRelateDoc(String relateDoc) {
            this.relateDoc = relateDoc;
        }

        public String getSubject() {
            return subject;
        }

        public void setSubject(String subject) {
            this.subject = subject;
        }
    }
}
